-
-
Notifications
You must be signed in to change notification settings - Fork 978
fix(vite-plugin): don't modify ROOT #4249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
View your CI Pipeline Execution ↗ for commit 90b850c.
☁️ Nx Cloud last updated this comment at |
we should use this in one of the examples to ensure this does not regress |
More templates
@tanstack/arktype-adapter
@tanstack/directive-functions-plugin
@tanstack/eslint-plugin-router
@tanstack/history
@tanstack/react-router-devtools
@tanstack/react-router
@tanstack/react-router-with-query
@tanstack/react-start
@tanstack/react-start-client
@tanstack/react-start-config
@tanstack/react-start-plugin
@tanstack/react-start-router-manifest
@tanstack/react-start-server
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-devtools-core
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-router
@tanstack/solid-router-devtools
@tanstack/solid-start
@tanstack/solid-start-client
@tanstack/solid-start-config
@tanstack/solid-start-plugin
@tanstack/solid-start-router-manifest
@tanstack/solid-start-server
@tanstack/start
@tanstack/start-api-routes
@tanstack/start-client-core
@tanstack/start-config
@tanstack/start-server-core
@tanstack/start-server-functions-client
@tanstack/start-server-functions-fetcher
@tanstack/start-server-functions-handler
@tanstack/start-server-functions-server
@tanstack/start-server-functions-ssr
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
@schiller-manuel good idea, I've added it to the kitchen sink example so it doesn't add complexity to the simpler ones |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a separate example to this one. Perhaps, even add it into the end-to-end testing suite.
@SeanCassiere I've used the basic file based e2e test here, all looks good. |
@RMHonor Small miscommunication on my part. Don't modify any of the existing sandboxes. Rather, add a new one. |
@SeanCassiere I follow now, thanks. What tests would you include in this scenario? I was thinking it could be a good opportunity to have a "custom config" suite. |
Doesn't need to be anything crazy. Just make sure that it can navigate from page to page. |
i am currently rewriting the generator and the plugins. can you please provide the example in this PR and I will then pick it onto my branch once I am done? trying to avoid merge conflicts |
…outer into 3624-vite-root-config
@SeanCassiere modified the e2e tests with this new suite. @schiller-manuel I've added a stackblitz link in the description, and the new e2e scenario also showcases the expected behaviour with the fix. |
Fixes #3624
Stackblitz of the error: https://stackblitz.com/edit/tanstack-router-f8savdzt?file=README.md
The docs state that the
routesDirectory
should be relative to the cwd (link), however the plugin was attempted to modify the ROOT to whatever was specified in the Vite config.This caused the generator to look in the wrong directory for the routes and the generated route tree.
Simply removing this modification of ROOT so the behaviour matches the plugin.
Is this a breaking change? No, the current behaviour doesn't work, and the workarounds (using an absolute route directory path) would not be broken when pulling this change.